package dao

// 这是 SimpleUploader 的全局公开dao对象
var SimpleUploaderDao = simpleUploaderDao{}

// 这是 simple_uploader表 的实体类
type SimpleUploader struct {
	ChunkNumber      string `json:"chunk_number" form:"chunk_number" binding:"chunk_number"`                   // 当前切片标记
	CurrentChunkSize string `json:"current_chunk_size" form:"current_chunk_size" binding:"current_chunk_size"` // 当前切片容量
	CurrentChunkPath string `json:"current_chunk_path" form:"current_chunk_path" binding:"current_chunk_path"` // 切片本地路径
	TotalSize        string `json:"total_size" form:"total_size" binding:"total_size"`                         // 总容量
	Identifier       string `json:"identifier" form:"identifier" binding:"identifier"`                         // 文件标识(md5)
	Filename         string `json:"filename" form:"filename" binding:"filename"`                               // 文件名
	TotalChunk       string `json:"total_chunk" form:"total_chunk" binding:"total_chunk"`                      // 切片总数
	FilePath         string `json:"file_path" form:"file_path" binding:"file_path"`                            // 文件本地路径
	IsDone           int    `json:"is_done" form:"is_done" binding:"is_done"`                                  // 是否上传完成

}

// 注意:这是 SimpleUploader 的私有dao对象
type simpleUploaderDao struct {
	Obj    SimpleUploader
	Insert func(arg SimpleUploader) int            //插入一条记录
	Update func(arg SimpleUploader) int            //更新一条记录
	Delete func(arg SimpleUploader) int            //删除一条记录
	Select func(arg SimpleUploader) SimpleUploader //获取一条记录
}
